Getting Started with Reports for WPF > Reports for WPF Quick Starts > C1Report Quick Start |
In this quick start you'll create a basic WPF application in Visual Studio that references Reports for WPF for previewing reports and documents.
Note: This quick start assumes that you have the sample CommonTasks.xml report definition file available on your system. The CommonTasks.xml is installed in the samples directory by default. |
Complete the following steps to create a basic form for previewing reports and documents:
Imports C1.C1Report
This makes the objects defined in the Reports for WPF assembly visible to the project.
Visual Basic Copy Code Dim rep As New C1.C1Report.C1Report() rep.Load("C:\Documents and Settings\<username>\My Documents\ComponentOne Samples\C1WPFReport\C1Report\Samples\XML\CommonTasks\CommonTasks.xml", "01: Alternating Background (Greenbar report)") DocumentViewer1.Document = rep.FixedDocumentSequence
C# Copy Code C1.C1Report.C1Report rep = new C1.C1Report.C1Report(); rep.Load(@"C:\\Documents and Settings\\<username>\\My Documents\\ComponentOne Samples\\C1WPFReport\\C1Report\\Samples\\XML\\CommonTasks\\CommonTasks.xml", @"01: Alternating Background (Greenbar report)"); documentViewer1.Document = rep.FixedDocumentSequence;
The report will take a few seconds to load, and will look similar to the following: